import { request } from '@umijs/max';

export async function login(data: { code: string }) {
    return request<API.LoginResponse>('/user/login', {
        method: 'POST',
        data,
    });
}

export async function getUserInfo() {
    return request<API.UserInfo>('/user/info', {
        method: 'GET',
    });
}
